{extend name="member/common/member_layout" /}

{block name="content"}

<link rel="stylesheet" type="text/css" href="__SITE_RESOURCE__/js/jquery-ui/themes/ui-lightness/jquery.ui.css"  />


<div class="wrap">
    <div class="tabmenu">

        <!-- submenu-->
        {include file="member/common/submenu"}


    </div>

    <div class="ncm-default-form">
        <form method="post" id="profile_form" action="/member/Information/member?a=1">
            <input type="hidden" name="form_submit" value="ok" />
            <input type="hidden" name="old_member_avatar" value="<?php echo $member_info['member_avatar']; ?>" />
            <input type="hidden" name="area_ids" id="area_ids" value="" />
            <dl>
                <dt>用户名称：</dt>
                <dd>
              <span class="w400"><?php echo $member_info['member_name']; ?>&nbsp;&nbsp;

              </span>
                   <!--  <span>&nbsp;&nbsp;隐私设置</span> -->
                </dd>
            </dl>
            <!--<dl>
                <dt>邮箱：</dt>
                <dd><span class="w400"><?php echo $member_info['member_email']; ?>&nbsp;&nbsp;

            </span> <span>
            <select name="privacy[email]">
              <option value="0" <?php if($member_info['member_privacy']['email'] == 0){?>selected="selected"<?php }?>>公开</option>
                <option value="1" <?php if($member_info['member_privacy']['email'] == 1){?>selected="selected"<?php }?>>好友可见</option>
                <option value="2" <?php if($member_info['member_privacy']['email'] == 2){?>selected="selected"<?php }?>>保密</option>
            </select>
            </span>
                </dd>
            </dl>-->
            <dl>
                <dt>真实姓名：</dt>
                <dd><span class="w400">
            <input type="text" class="text" maxlength="20" name="member_truename" value="<?php echo $member_info['member_truename']; ?>" />
            </span><!-- <span>
            <select name="privacy[truename]">
              <option value="0" <?php if($member_info['member_privacy']['truename'] == 0){?>selected="selected"<?php }?>>公开</option>
                <option value="1" <?php if($member_info['member_privacy']['truename'] == 1){?>selected="selected"<?php }?>>好友可见</option>
                <option value="2" <?php if($member_info['member_privacy']['truename'] == 2){?>selected="selected"<?php }?>>保密</option>
            </select>
            </span> --></dd>
            </dl>
            <dl>
                <dt>性别：</dt>
                <dd><span class="w400">
            <label>
              <input type="radio" name="member_sex" value="3" <?php if($member_info['member_sex']==3 or ($member_info['member_sex']!=2 and $member_info['member_sex']!=1)) { ?>checked="checked"<?php } ?> />
                保密</label>
            &nbsp;&nbsp;
            <label>
              <input type="radio" name="member_sex" value="2" <?php if($member_info['member_sex']==2) { ?>checked="checked"<?php } ?> />
                女</label>
            &nbsp;&nbsp;
            <label>
              <input type="radio" name="member_sex" value="1" <?php if($member_info['member_sex']==1) { ?>checked="checked"<?php } ?> />
                男</label>
            </span><!-- <span>
            <select name="privacy[sex]">
              <option value="0" <?php if($member_info['member_privacy']['sex'] == 0){?>selected="selected"<?php }?>>公开</option>
                <option value="1" <?php if($member_info['member_privacy']['sex'] == 1){?>selected="selected"<?php }?>>好友可见</option>
                <option value="2" <?php if($member_info['member_privacy']['sex'] == 2){?>selected="selected"<?php }?>>保密</option>
            </select>
            </span> --></dd>
            </dl>
            <dl>
                <dt>生日：</dt>
                <dd><span class="w400">
            <input type="text" class="text" name="birthday" maxlength="10" id="birthday" value="<?php echo $member_info['member_birthday']; ?>" />
            </span><!-- <span>
            <select name="privacy[birthday]">
              <option value="0" <?php if($member_info['member_privacy']['birthday'] == 0){?>selected="selected"<?php }?>>公开</option>
                <option value="1" <?php if($member_info['member_privacy']['birthday'] == 1){?>selected="selected"<?php }?>>好友可见</option>
                <option value="2" <?php if($member_info['member_privacy']['birthday'] == 2){?>selected="selected"<?php }?>>保密</option>
            </select>
            </span> --></dd>
            </dl>
            <dl>
                <dt>所在地区：</dt>
                <dd><span class="w400">
          <input type="hidden" name="region" id="region" value="<?php echo $member_info['member_areainfo']; ?>" /></span><!-- <span>
            <select name="privacy[area]">
              <option value="0" <?php if($member_info['member_privacy']['area'] == 0){?>selected="selected"<?php }?>>公开</option>
                <option value="1" <?php if($member_info['member_privacy']['area'] == 1){?>selected="selected"<?php }?>>好友可见</option>
                <option value="2" <?php if($member_info['member_privacy']['area'] == 2){?>selected="selected"<?php }?>>保密</option>
            </select>
            </span> --></dd>
            </dl>
            <dl>
                <dt>QQ：</dt>
                <dd><span class="w400">
            <input type="text" class="text" maxlength="30" name="member_qq" value="<?php echo $member_info['member_qq']; ?>" />
            </span><!-- <span>
            <select name="privacy[qq]">
              <option value="0" <?php if($member_info['member_privacy']['qq'] == 0){?>selected="selected"<?php }?>>公开</option>
                <option value="1" <?php if($member_info['member_privacy']['qq'] == 1){?>selected="selected"<?php }?>>好友可见</option>
                <option value="2" <?php if($member_info['member_privacy']['qq'] == 2){?>selected="selected"<?php }?>>保密</option>
            </select>
            </span> --> </dd>
            </dl>
            <!--<dl>
                <dt>阿里旺旺：</dt>
                <dd><span class="w400">
            <input name="member_ww" type="text" class="text" maxlength="50" id="member_ww" value="<?php echo $member_info['member_ww'];?>" />
            </span> <span>
            <select name="privacy[ww]">
              <option value="0" <?php if($member_info['member_privacy']['ww'] == 0){?>selected="selected"<?php }?>>公开</option>
                <option value="1" <?php if($member_info['member_privacy']['ww'] == 1){?>selected="selected"<?php }?>>好友可见</option>
                <option value="2" <?php if($member_info['member_privacy']['ww'] == 2){?>selected="selected"<?php }?>>保密</option>
            </select>
            </span> </dd>
            </dl>-->
            <dl class="bottom">
                <dt></dt>
                <dd>
                    <label class="submit-border">
                        <input type="submit" class="submit" value="保存修改" />
                    </label>
                </dd>
            </dl>
        </form>
    </div>
</div>
<script type="text/javascript">
    //注册表单验证
    $(function(){
        $("#region").nc_region({show_deep:3,btn_style_html:'style="background-color: #F5F5F5; width: 60px; height: 32px; border: solid 1px #E7E7E7; cursor: pointer"'});
        $('#birthday').datepicker({dateFormat: 'yy-mm-dd'});
        $('#profile_form').validate({
            submitHandler:function(form){
                $('#area_ids').val($('#region').fetch('area_ids'));
                ajaxpost('profile_form', '', '', 'onerror')
            },
            rules : {
                member_truename : {
                    minlength : 2,
                    maxlength : 20
                },
                member_qq : {
                    digits  : true,
                    minlength : 5,
                    maxlength : 12
                }
            },
            messages : {
                member_truename : {
                    minlength : '姓名长度大于等于2位小于等于20位',
                    maxlength : '姓名长度大于等于2位小于等于20位'
                },
                member_qq  : {
                    digits    : '请填入正确的QQ号码',
                    minlength : '请填入正确的QQ号码',
                    maxlength : '请填入正确的QQ号码'
                }
            }
        });
    });
</script>
<script charset="utf-8" type="text/javascript" src="__SITE_RESOURCE__/js/jquery-ui/i18n/zh-CN.js" ></script>

{/block}
